//合作机构管理列表。
Ext.define("ES.view.cooperation.CooperationList",{
    extend:"Ext.grid.Panel",
    alias:"widget.CooperationTabList",
    closable:true,
    title:"合作机构管理",
    store:"CooperationStore",
    selType:"checkboxmodel",
    multiSelect:true,
    frame:true,
    layout:{
        type:"fit",
        align:"stretch"
    },
    sortableColumns:false,
    viewConfig:{
        forceFit:true,
        columnLines:true,
        stripRows:true
    },
    tbar:{
            xtype:"toolbar",
            height:36,
            items:["机构名称：",{
                    xtype:"textfield",
                    width:168
            }," ","联系电话：",{
                    xtype:"textfield",
                    width:168
            }," ",{
                    xtype:"button",
                    action:"btnQuery",
                    iconCls:'search-trigger-icon',
                    text:"检索",
                    tooltip:"检索数据"
            },"->",{
                    xtype:"button",
                    action:"btnAdd",
                    iconCls:"add-icon",
                    text:"新增",
                    tooltip:"新增数据"
            },"-",{
                    xtype:"button",
                    action:"btnDelete",
                    iconCls:"delete-icon",
                    text:"删除",
                    tooltip:"删除数据"
            }]
    },
    bbar:[{
        xtype:"pagingtoolbar",
        store:"CooperationStore",
        displayInfo:true
    }],
    WayStore:Ext.create("ES.store.CooperationWayStore"),
    StatusStore:Ext.create("ES.store.StatusStore"),
    columns:[{
            header:"序号",
            width:32,
            align:"right",
            xtype:"rownumberer"
    },{
            header:"机构代码",
            width:168,
            align:"left",
            menuDisabled:true,
            sortable:false,
            dataIndex:"cooperationCode"
    },{
            text:"机构名称",
            width:168,
            flex:1,
            align:"left",
            menuDisabled:true,
            sortable:false,
            dataIndex:"cooperationName"
    },{
            text:"合作方式",
            width:64,
            align:"center",
            menuDisabled:true,
            sortable:false,
            dataIndex:"cooperationWay",
            renderer:function(value){
                return this.WayStore.getWayText(value);
            }
    },{
            text:"联系电话",
            width:128,
            align:"left",
            menuDisabled:true,
            sortable:false,
            dataIndex:"telPhone"
    },{
            text:"开户银行",
            width:168,
            align:"left",
            sortable:false,
            menuDisabled:true,
            dataIndex:"bankName"
    },{
            text:"授权码",
            width:148,
            align:"left",
            menuDisabled:true,
            sortable:false,
            dataIndex:"authorizationCode"
    },{
            text:"状态",
            width:64,
            align:"center",
            menuDisabled:true,
            sortable:false,
            dataIndex:"status",
            renderer:function(value){
                return this.StatusStore.getStatusText(value);
            }
    }],
    initComponent:function(){
        this.callParent(arguments);
    }
})